<?
// ������������ ������ ������.
class c_demo_controller
{
	function index($args)
	{
		global $mvc;
		$html = '';
		$html .= $mvc->parse('<a href="{base_url}demo/db1">db1</a>');
		
		return $html;
	}
	
	// ����� �������� �������.
	function db1($args)
	{
		global $mvc,$modx;

		echo "<pre>";
                print_r($modx->db->get_record("site_content","id=1"));

                echo "<hr/>";

                print_r($modx->db->get_records($mvc->parse('SELECT id FROM {dbpref}site_content')));
                
                echo "<hr/>";

		$sql = $mvc->parse('SELECT id FROM {dbpref}site_content');
		return print_r($mvc->db->get_data($sql), true);
	}
}

?>